#include <iostream>
#include <cstdio>
using namespace std;

double a[1010][1010];
int n,s;
void f_set(int p,int q)
{
    a[p][q]=1;
    a[p][q]+=a[p][q+1]*p*(s-q)/n/s;
    a[p][q]+=a[p+1][q]*(n-p)*q/n/s;
    a[p][q]+=a[p+1][q+1]*(n-p)*(s-q)/n/s;
    a[p][q]/=1.0-((double)p*q/n/s);
}
int main()
{
    int i,j;
    cin>>n>>s;
    fill(a[0],a[0]+1010*1010,0);
    for(i=n-1;i>=1;i--)
    {
        f_set(i,s);
    }
    for(i=s-1;i>=1;i--)
    {
        f_set(n,i);
    }
    for(i=n-1;i>=1;i--)
    {
        for(j=s-1;j>=1;j--)
            f_set(i,j);
    }
    printf("%.4f\n",a[1][1]+1);
    return 0;
}
